﻿// Decompiled with JetBrains decompiler
// Type: UnityEngine.SceneManagement.SceneManagerAPIInternal
// Assembly: UnityEngine.CoreModule, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
// MVID: E6AE6B5A-2752-4B07-9528-C8B77C62CE79
// Assembly location: C:\Users\windys\Unity\2021.3.39f1c1\Editor\Data\Managed\UnityEngine\UnityEngine.CoreModule.dll
// XML documentation location: C:\Users\windys\Unity\2021.3.39f1c1\Editor\Data\Managed\UnityEngine\UnityEngine.CoreModule.xml

using System.Runtime.CompilerServices;
using UnityEngine.Bindings;

#nullable disable
namespace UnityEngine.SceneManagement
{
  [NativeHeader("Runtime/Export/SceneManager/SceneManager.bindings.h")]
  [StaticAccessor("SceneManagerBindings", StaticAccessorType.DoubleColon)]
  [NativeHeader("Runtime/SceneManager/SceneManager.h")]
  internal static class SceneManagerAPIInternal
  {
    [MethodImpl(MethodImplOptions.InternalCall)]
    public static extern int GetNumScenesInBuildSettings();

    [NativeThrows]
    public static Scene GetSceneByBuildIndex(int buildIndex)
    {
      Scene ret;
      SceneManagerAPIInternal.GetSceneByBuildIndex_Injected(buildIndex, out ret);
      return ret;
    }

    [NativeThrows]
    public static AsyncOperation LoadSceneAsyncNameIndexInternal(
      string sceneName,
      int sceneBuildIndex,
      LoadSceneParameters parameters,
      bool mustCompleteNextFrame)
    {
      return SceneManagerAPIInternal.LoadSceneAsyncNameIndexInternal_Injected(sceneName, sceneBuildIndex, ref parameters, mustCompleteNextFrame);
    }

    [NativeThrows]
    [MethodImpl(MethodImplOptions.InternalCall)]
    public static extern AsyncOperation UnloadSceneNameIndexInternal(
      string sceneName,
      int sceneBuildIndex,
      bool immediately,
      UnloadSceneOptions options,
      out bool outSuccess);

    [MethodImpl(MethodImplOptions.InternalCall)]
    private static extern void GetSceneByBuildIndex_Injected(int buildIndex, out Scene ret);

    [MethodImpl(MethodImplOptions.InternalCall)]
    private static extern AsyncOperation LoadSceneAsyncNameIndexInternal_Injected(
      string sceneName,
      int sceneBuildIndex,
      ref LoadSceneParameters parameters,
      bool mustCompleteNextFrame);
  }
}
